<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>搜索页面</title>
    <shopheader th:replace="shopheader"></shopheader>
    <link href="/shop/css/seastyle.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/shop/js/script.js"></script>
</head>

<body>
<tps th:replace="top-nav-search"></tps>
<div style="padding-top:10px; padding-bottom:5px;margin:0px 40px 10px 0px;">
    <navtable th:replace="nav-table"></navtable>
    <b class="line"></b>
</div>
<!--顶部导航条 -->
<div class="am-container">
    <div class="search">
        <div class="search-list">
            <div class="am-g am-g-fixed">
                <div class="am-u-sm-12 am-u-md-12">
                    <div class="theme-popover">
                        <div class="searchAbout" th:if="${about}">
                            <span class="font-pale">相关搜索：</span>
                            <a th:each="a,i:${about}" th:text="${a.name}"
                               th:id="|category_name:${name};category_id:${a.id};pid:${a.parent_id};page:1;limit:36|"></a>
                        </div>
                        <ul class="select" th:if="${classify}">
                            <p class="title font-normal">
                                <span class="fl" th:text="${name}"></span>
                                <span class="total fl"> <strong id="number" class="num" th:text="${count}"></strong> 件相关商品</span>
                            </p>
                            <div class="clear"></div>
                            <opt th:remove="!${classify}?all:tag">
                                <li class="select-result">
                                    <dl>
                                        <dt>已选</dt>
                                        <dd class="select-no"></dd>
                                        <p class="eliminateCriteria">清除</p>
                                    </dl>
                                </li>
                                <div class="clear"></div>
                                <li class="select-list" th:each="c,i:${classify}">
                                    <dl th:id="'select'+${i.count}" id="select1">
                                        <dt class="am-badge am-round" th:text="${c.name}"></dt>
                                        <div class="dd-conent">
                                            <dd class="select-all selected">
                                                <a>全部</a>
                                            </dd>
                                            <dd th:each="${c.value}?v,i:${c.value}">
                                                <a th:text="${v}"></a>
                                            </dd>
                                        </div>
                                    </dl>
                                </li>
                            </opt>
                        </ul>
                        <div class="clear"></div>
                    </div>
                    <div class="search-content">
                        <div class="sort" id="sortOption">
                            <!--
                                    此处理应加入选择升降序排序方式
                                    现有排序方式为销量降序价格升序
                            -->
                            <li id="defaultSort" th:class="${query.contains('sort')}?'sort_list':'first sort_list'">
                                <a title="综合">综合排序</a>
                            </li>
                            <li id="salesFirst"
                                th:class="${query.contains('sell_volume')}?'first sort_list':'sort_list'">
                                <a title="销量">销量排序</a>
                            </li>
                            <li id="priceFirst"
                                th:class="${query.contains('retail_price')}?'first sort_list':'sort_list'">
                                <a title="价格">价格优先</a>
                            </li>
                        </div>
                        <div class="clear" id="clearFloat" th:name="${query}"></div>
                        <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes" id="searchResult" th:if="${goods}">
                            <li th:each="g,i:${goods}" th:title="${i.count}">
                                <a th:href="'/introduction/'+${g.id}">
                                    <div class="i-pic limit">
                                        <img th:src="${g.list_pic_url}"/>
                                        <p class="title fl" th:text="${g.name}"></p>
                                        <p class="price fl">
                                            <b>¥</b>
                                            <strong th:text="${g.retail_price}"></strong>
                                        </p>
                                        <p class="number fl">销量<span th:text="${g.sell_volume}"></span></p>
                                    </div>
                                </a>
                            </li>
                        </ul>
                        <div th:if="!${goods.size()}">
                            <h1 th:text="未检索到相关商品！" style="font-size: 24px;font-weight:bold;text-align: center;"></h1>
                        </div>
                    </div>
                    <div class="search-side">
                        <div class="side-title">经典搭配</div>
                        <li th:each="c,i:${crash}">
                            <div class="i-pic check">
                                <img th:src="${c.list_pic_url}"/>
                                <p class="check-title" th:text="${c.name}"></p>
                                <p class="price fl"><b>¥</b><strong th:text="${c.retail_price}"></strong></p>
                                <p class="number fl">销量<span th:text="${c.sell_volume}"></span></p>
                            </div>
                        </li>
                    </div>
                    <div class="clear"></div>
                    <!--分页-->
                    <ul class="am-pagination am-pagination-right" id="pageList" th:remove="${pages} lt 2?all">
                        <li id="lastButton" th:class="${curPg} eq 1?'am-disabled'"><a>&laquo;</a></li>
                        <li th:each="i:${#numbers.sequence(1,pages)}"
                            th:class="${i} eq ${curPg}?'am-active pageIndex':'pageIndex'"><a th:text="${i}">2</a></li>
                        <li id="nextButton" th:class="${curPg} eq ${pages}?'am-disabled'"><a>&raquo;</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<!--引导-->
<div class="navCir">
    <li>
        <a href="/"><i class="am-icon-home "></i>首页</a>
    </li>
    <li>
        <a href="/sort"><i class="am-icon-list"></i>分类</a>
    </li>
    <li>
        <a href="/shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a>
    </li>
    <li>
        <a href="/shop/person/index.html"><i class="am-icon-user"></i>我的</a>
    </li>
</div>
<footer th:replace="footer"></footer>
<tips th:replace="tips"></tips>
<script type="text/javascript" src="/shop/basic/js/quick_links.js"></script>
<div class="theme-popover-mask"></div>
</body>

</html>